import request from '@/utils/request'

// 查询饮食建议信息列表
export function listAdvice(query) {
  return request({
    url: '/teahouse/advice/list',
    method: 'get',
    params: query
  })
}

// 查询饮食建议信息详细
export function getAdvice(adviceId) {
  return request({
    url: '/teahouse/advice/' + adviceId,
    method: 'get'
  })
}

// 新增饮食建议信息
export function addAdvice(data) {
  return request({
    url: '/teahouse/advice',
    method: 'post',
    data: data
  })
}

// 修改饮食建议信息
export function updateAdvice(data) {
  return request({
    url: '/teahouse/advice',
    method: 'put',
    data: data
  })
}

// 删除饮食建议信息
export function delAdvice(adviceId) {
  return request({
    url: '/teahouse/advice/' + adviceId,
    method: 'delete'
  })
}
